# Contributor: Timo Teräs <timo.teras@iki.fi>
# Maintainer: Timo Teräs <timo.teras@iki.fi>
pkgname=libcdr
pkgver=0.1.6
pkgrel=3
pkgdesc="Import filter and tools for Corel DRAW files"
url="https://wiki.documentfoundation.org/DLP/Libraries/libcdr"
arch="all"
license="MPL-2.0"
depends_dev="boost-dev"
makedepends="$depends_dev doxygen icu-dev lcms2-dev zlib-dev librevenge-dev"
subpackages="$pkgname-dev $pkgname-doc $pkgname-tools"
source="https://dev-www.libreoffice.org/src/libcdr/libcdr-$pkgver.tar.xz"

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--localstatedir=/var
	make
}

check() {
	make check
}

package() {
	make DESTDIR="$pkgdir" install
}

tools() {
	mkdir -p "$subpkgdir"/usr
	mv "$pkgdir"/usr/bin "$subpkgdir"/usr
}

sha512sums="629d55da71c7333f41f60a32e2880deffcf80088096af1bbc8c572b80ef21d851102fdebce56f77245ed60822ca98e02c0867b192abef496a2313fde54a97bb6  libcdr-0.1.6.tar.xz"
